#define _CRT_SECURE_NO_WARNINGS 1
#include"string.h"
using namespace mystring;
using std::cout;
using std::cin;
using std::endl;
void test_string()
{
	//string str("hello world!");
	//std::string str1("hello world!");

	//string str();
	//std::string str1();

	//std::string s("hello worldfewwwwwwwwwefffffffffffffffffff!");
	////std::string str1("hello world!");
	//std::string s2("o");
	//std::string s3("dwkol");
	//s3=s2=s;

	string t1("hello worldfwe");
	//std::string str1("hello world!");
	string t2("o");
	string t3("dwkol");
	cout << t1.c_str() << endl;
	cout << t2.c_str() << endl;
	cout << t3.c_str() << endl;
 	t1 = t3;
	cout << t1.c_str() << endl;
	t2 = t2;
	cout << t2.c_str() << endl;
	t3 = t2;
	cout << t3.c_str() << endl;
	t1.clear();
	cout << t1.c_str();
}
void test_string1()
{
	//string s("ashfiouf");
	//cout << s.c_str()<< endl;

	//for (auto &ch : s)
	//{
	//	cout << ch;
	//}


	string s1("11111111111111");
	//for (auto& ch : s1)
	//{
	//	s1 += '2';
	//	s1.push_back('c');
	//}
	//cout << s1.c_str() << endl;
	//s1.append("22222222");
	
	//s1 += 'c';
	//cout << s1.c_str() << endl;	
	cout << s1.size()<< endl;
	//s1 += "8888888888888";
	//cout << s1.c_str() << endl;
	//cout << s1.size() << endl;
	//cout << s1.capacity() << endl;
	//cout << s1.empty()<< endl;

	//s1.resize(17,'#');
	//cout << s1.c_str() << endl;
	//const string s2(s1);
	//for (size_t i = 0; i < s1.size(); i++)
	//{
	//	cout << s2[i];

	//}

	//cout << s1[0]<< endl;

	

}

void test_string2()
{
	//<
	string s1("dwaoghdfuiqfg");
	string s2("dwaoghdfuiqfge");
	cout << (s1 < s2) << endl;
	cout << (s1 <= s2) << endl;
	cout << (s1 == s2) << endl;
	cout << (s1 > s2) << endl;
	cout << (s1 >= s2) << endl;
	cout << (s1 != s2) << endl<<endl;

	//>
	string s3("dwaoghdfuiqfge");
	string s4("dwaoghdfuiqfg");
	cout << (s3 < s4) << endl;
	cout << (s3 <= s4) << endl;
	cout << (s3 == s4) << endl;
	cout << (s3 > s4) << endl;
	cout << (s3 >= s4) << endl;
	cout << (s3 != s4) << endl << endl;

	//==
	string s5("dwaoghdfuiqfg");
	string s6("dwaoghdfuiqfg");
	cout << (s5 < s6) << endl;
	cout << (s5 <= s6) << endl;
	cout << (s5 == s6) << endl;
	cout << (s5 > s6) << endl;
	cout << (s5 >= s6) << endl;
	cout << (s5 != s6) << endl<<endl;


}


void test_string3()
{
	string s1("123456789");
	//cout << s1.find('z',5);
	//cout << s1.find("h1") << endl;
	//cout << s1.substr().c_str()<<endl;
	//cout << s1.insert(s1.size(), '0').c_str();
	//cout << s1.insert(s1._size, "0000000").c_str();
	//cout<<strlen(s1._str);
	cout << s1.erase(0, 0)<<endl;
	cin >> s1;
	cout << s1<< endl;


}
void test_string4()
{
	string s1("123456789");
	string s2(s1);
	cout << s2 << endl;
	string s3= s2;
	cout << s3 << endl;

}



int main()
{
	test_string4();
	return 0;
 }